﻿
/*
date	   :2010-10-1
author	   :by wangchao cwangchao@gmail.com
*/
//AddMouseDownListener(OnPreClick);
AddMouseDownListener(OnMouseDown);
AddLoadListener(OnPageLoad);
function OnPreClick() {}

function OnPageLoad() {
/*
    BestLoadScript("../Scripts/curvycorners.src.js", OncurvycornersScriptLoaded);
    
    //绑定删除按钮
    var Elements = document.getElementsByTagName("*");
    for(var i=0;i<Elements.length;i++)
    {
        if (Elements[i].outerText == "删除") {
            Elements[i].onclick = "\"ConfirmDel();\"";
            var a = 1;
            a = 2;
            a = 3;
            a = 4;
            a = 5;
        }
    } 
*/
    CallEx("test.js","Test");
}
function HelloWorld()
{
	alert("Hello,World!");
}
function OncurvycornersScriptLoaded() 
{
    SetScriptCharSet();
    settings = {
        tl: { radius: 20 },
        tr: { radius: 20 },
        bl: { radius: 20 },
        br: { radius: 20 },
        antiAlias: true,
        autoPad: false
    }
    var divObj = document.getElementById("QueryNav");
    var cornersObj = new curvyCorners(settings, divObj);
    cornersObj.applyCornersToAll();
}

function SetScriptCharSet()
{
    scriptArry = document.getElementsByTagName('script');
    for (var i in scriptArry) {
        i.charset = "gb2312";
        //i.outerHTML.replace("<SCRIPT", "<SCRIPT charset='gb2312'");
    }
}

//ShowPicture
function ShowPicture(Path) {
    window.open(Path)
}

function ConfirmDel() {
    if (!window.confirm("您确定要删除吗？")) {
        return false;
    }
    return true;
}

//table 
function SelectAll(ele) {
    var list = document.getElementsByTagName("input");
    for (var i = 0; i < list.length; i++) {
        if (list[i].type == "checkbox" && list[i].id.indexOf("cbItem") != -1) {
            list[i].checked = ele.checked;
        }
    }
}

function OnLoad() {
    //WebAnalytics();
}
function BeforeUnload() {
    window.event.returnValue = '关闭浏览器将退出系统.';
}
if (typeof (Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();

